package cn.itcast.service.stat.impl;

import cn.itcast.dao.stat.StatDao;
import cn.itcast.service.stat.StatService;
import com.alibaba.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

/**
 * @author LT
 * @version 1.0.0
 * @ClassName StatServiceImpl.java
 * @Description TODO 统计服务实体类
 * @createTime 2020年04月07日 22:03:00
 */
@Service
public class StatServiceImpl implements StatService {

    @Autowired
    private StatDao statDao;

    /**
     * 获取厂家的销售情况
     *
     * @param companyId
     * @return
     */
    @Override
    public List<Map<String, Object>> getFactoryData(String companyId) {
        return statDao.getFactoryData(companyId);
    }

    /**
     * 获取产品的销售前五名
     *
     * @param companyId
     * @return
     */
    @Override
    public List<Map<String, Object>> getSellData(String companyId) {
        return statDao.getSellData(companyId);
    }

    /**
     * 获取访问压力数据
     *
     * @param companyId
     * @return
     */
    @Override
    public List<Map<String, Object>> getOnLineData(String companyId) {
        return statDao.getOnLineData(companyId);
    }
}
